home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Textfiles / Basic Mac Cracking < prev    next >
Text File  |  1995-10-10  |  7KB  |  81 lines

  1. Really Simple Software Cracking
  2. Or "How I spent an hour cracking my first program" (nostalgic sigh)
  3. by The Observer
  4.  
  5. (Well, not too nostalgic--this was only a few days ago. But anyway.)
  6.  
  7. This file is for educational purposes only. I don't support cracking software as an alternative to paying for it, and I sincerely ask anyone who uses these directions not to distribute cracked versions of Relax (I didn't), which is the program we'll be discussing.
  8.  
  9. The Scenario...
  10. There's a shareware program called Relax (which may have been included with this file), which plays some little nature sounds in the background. Nice, but not where I'm going to spend my money. In order to get you to pay up, the authors pop up a reminder dialog whenever you open the unregistered version. You have to wait a few seconds until the OK button to dismiss it is enabled. Then comes a screen for a few seconds while it loads the sounds into memory. I wanted to be able to open the program without any of these silly dialogs popping up, so I could open the program and get right back to what I was doing.
  11.  
  12.  
  13. First things first...
  14. There's a nice set of two files on oleBuzzard's web site [see bottom] called How to Crack. While a lot of what was in these were over my head, one thing they had mentioned stuck--to find a piece of offending code, use ResEdit to find the DLOG ID you want to get rid of--then look for it in the code. I'd done enough Mac programming to know the basics of dialog boxes--GetNewDialog to show them, ModalDialog to get events within them, and a few other toolbox calls that proved helpful.
  15.  
  16. But anyway. A quick peek with ResEdit revealed that I wanted to avoid DLOG 9990. Swapping this into hex, we get 2706. Onwards into the code.
  17.  
  18.  
  19. Resorcerer...
  20. Resorcerer, for those who don't know, is a totally fucking kickass program. The only way I can describe it is ResEdit done right, on steroids--except that that doesn't begin to describe its code viewing/editing features. Just get it. Now.
  21.  
  22. OK, now that you've got your Resorcerer (I used 1.2.5), open up the CODE resource. Do a search for 2706. Whaddaya know--only one instance. Had there been more, there were a few things which were pretty good signs I was in the right place, even though I know next to no assembler:
  23. 1. It's in a move.w just before a _GetNewDialog (this is a pretty big giveaway)
  24. 2. The procedure it's in also has _Delay and _HiliteControl calls, which I recognized as being responsible for de-/activating the OK button and (surprise!) causing a delay before it was activated.
  25.  
  26. To illustrate, here's the code that I'm blabbering about:
  27. move.w    #$2706,-(sp)
  28. clr.l     -(sp)
  29. pea       -$0001
  30. _GetNewDialog        ; TB trap
  31. [some little dialog preparation stuff here...]
  32. _HiliteControl       ; TB trap
  33. move.l    a4,-(sp)
  34. _DrawDialog          ; TB trap
  35. lea       -$001A(a6),a1
  36. movea.w   #$00C8,a0
  37. _Delay               ; OS trap
  38.  
  39.  
  40. OK, so we've found the annoying procedure. The obvious next step--delete the whole thing!!
  41.  
  42.  
  43. Not quite...
  44. Even in this file, I've omitted certain blunders I made before hitting on this method. Not that I'm embarrassed, but they're not very interesting or educational. This one, on the other hand, is a mistake I made from which I actually learned something which seems pretty significant.
  45.  
  46. I tried deleting the whole procedure (technically, I set it all to NOP, which I assume means No Operation--see, I told you I don't know much assembler). This made the program just stop in its tracks. Whoops. It hadn't frozen, though; a force quit took me back to the Finder.
  47.  
  48. Here's the end of the procedure:
  49. _DisposeDialog       ; TB trap
  50. tst.b     d7
  51. beq.s     <Anon_08>+$72
  52. movem.l   (sp)+,d7/a4
  53. unlk      a6
  54. rts
  55.  
  56. The last line in the procedure is "rts," which seems to be common at the end of all procedures. Guessing that rts had something to do with returning after a procedure (pretty logical, given that the program had just plain stopped), I NOP'ed the entire thing except that line. And it worked--no more delayed box to click out of!!
  57.  
  58.  
  59. Cool, but not quite done...
  60. Getting rid of the splash screen was actually a little trickier, as the next dialog to get rid of was 200, or C8. Being a much more common number than 2706, there were quite a few C8's in the code. I decided it would be easier to look for a _GetNewDialog or _GetDialog without much else near it (particularly _ModalDialog, which handles events in dialog boxes. Remember, this next dialog doesn't need a click, just a few seconds). Relax is a pretty small program, so this method was practical enough.
  61.  
  62. I found one, and instead of NOP'ing it out, I had Resorcerer branch around just about the whole procedure. I don't know the merits, if any, of one method against the other--I was just playing around, and it worked, so I wasn't complaining. If anyone more knowledgeable is reading this, and wants to shed some light on this issue, please let me know at the addresses at the bottom of the file.
  63.  
  64. But back to the story. Now the dialogs were gone, but the about box still had "UNREGISTERED COPY" glaring in my face. I was on a roll, and didn't like this. The solution--delete the "UN" from each of two instances of "UNREGISTERED COPY" in the DATA resource. What then showed up was "GISTERED COPY" and then some high ASCII garbage. The solution I hit upon was really simple, and since it doesn't involve any technical knowledge (just a touch of thinking), I'll leave it as a little closing exercise.
  65.  
  66.  
  67. That's it...
  68. I'm not making any claims that this was some humungous technical effort, as should be apparent to anyone reading this fairly short file. But I'd always considered this sort of thing way out of my league, and I do think it's pretty cool that I could pull off even a minor crack like this. Of course, as I have the time, I'll be working on other stuff... Hope to have some more advanced files being put out as time progresses.
  69.  
  70. Comments, questions, suggestions, and by all means corrections--Observer on k0p, or an407599@anon.penet.fi. (Sorry bout the anon address, but otherwise it's a little too easy for people to give me shit about this...)
  71.  
  72. I mentioned oleBuzzard's web site earlier--if it's not THE place to start checking out the Mac underground, I don't know what would be. http://www.uccs.edu/~abusby/k0p.html
  73.  
  74. <PREACH>
  75. I really do want to say that distributing cracked versions of shareware is a great way to kill what is a pretty lively Mac shareware scene. Sure, it's cool to be able to crack software, but there's something to be said for paying for (or at least not distributing cracked versions of) the things you really enjoy as well. Don't start thinking you own the world, because if you haven't known most of the stuff in this file, a lot of the people you're not paying can probably program circles around you.
  76.  
  77. And in all honesty, I might even break down and send Software Perspectives their $10 after all. :-) Since I'm basically inviting the world to crack their program, I feel like I should at least include their address, just in case anyone else feels an urge:
  78. Software Perspectives
  79. 3084 Peachtree Court
  80. Lake Ridge, Virginia 22192-1518
  81. </PREACH>